<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="entitybean.systemtree.EntityBeanSystemtree"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'show_systemtree.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--  <link rel="stylesheet" type="text/css" href="<%=basePath%>css/css_style.css">-->
	<link href="<%=request.getContextPath() %>/css/style.css" rel="stylesheet" type="text/css" />			

  </head>
  <% 
    @SuppressWarnings("unchecked")  
  List<EntityBeanSystemtree>listsystemtree=(List<EntityBeanSystemtree>)request.getAttribute("systemtreelist");
  String lv=(String)request.getAttribute("lv");
  @SuppressWarnings("unchecked")  
  HashSet<Integer> RolePower = (HashSet<Integer>) request.getSession().getAttribute("RolePower");%>
  <body>
  
		   <div id="subtree<%=listsystemtree.get(0).getC_jd()%>" style="">
			<% 
			if (listsystemtree.size() == 0) {
			for (int j = 0; j < Integer.valueOf(lv); j++) {
				response.getWriter().print(
						"&nbsp;&nbsp;&nbsp;&nbsp;");
			}
			response.getWriter().print("没有子节点");

		} else {
			for (int i = 0; i < listsystemtree.size(); i++) {
				if (!listsystemtree.get(i).getUrl().equals("blank")) {
					if(RolePower.contains(listsystemtree.get(i).getF_jd()))
					{
					for (int j = 0; j < Integer.valueOf(lv); j++) {
						
						response
								.getWriter()
								.print(
										"&nbsp;&nbsp;&nbsp;&nbsp;");
					}
					response.getWriter().print(
							" <li><img src='"+path+"/images/ico06.gif' width='9px' height='12px'>"+"<a target='mainFrame' href='"+path+"/"+
									listsystemtree.get(i).getUrl() + "'>"
									+ listsystemtree.get(i).getJd_name()
									+ "</a>");
					response.getWriter().print("</li>");
					}} else {
						if(RolePower.contains(listsystemtree.get(i).getF_jd()))
						{
					response.getWriter().print(
							"<div style='cursor:hand' class='font_12' id =jd_'" + listsystemtree.get(i).getF_jd()
									+ "_c'" + " onclick='fuckyou("
									+ listsystemtree.get(i).getF_jd() + ","
									+ listsystemtree.get(i).getLv() + ")'>");
					for (int j = 0; j < Integer.valueOf(lv); j++) {
						response
								.getWriter()
								.print(
										"&nbsp;&nbsp;&nbsp;&nbsp;");
					}
					response.getWriter().print(" <img src='"+path+"/images/ico06.gif' width='8px' height='12px'>"+
							listsystemtree.get(i).getJd_name() + "</div>");
					response.getWriter().print(
							"<div id=jd_" + listsystemtree.get(i).getF_jd()
									+ "_c style='display:none'>载入数据中</div>");
						}
				}
			}
		}%>
	 </div>
  </body>
</html>
